package com.ee.chat.admin.controller2.operatemanage;

import com.ee.chat.admin.service2.IDataAnalysisService;
import com.ee.chat.common.bean.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @Author AppiJ
 * @Date 2020/10/13 20:53
 */
@RestController
@RequestMapping("dataAnalysis")
public class DataAnalysisController {
    private Logger log = LoggerFactory.getLogger(DataAnalysisController.class);

    @Resource
    IDataAnalysisService dataAnalysisService;

    /**
     * 获取数据分析列表
     * @Author AppiJ
     * @Date 2020/10/13 20:55
     * @param
     * @return
     */
    @RequestMapping("list")
    public Result list(HttpServletRequest request, String createTime, @RequestParam Integer page, @RequestParam Integer limit){
        try{
            return dataAnalysisService.list(request, createTime, page, limit);
        }catch (Exception e){
            log.error("【获取数据分析列表错误】", e);
        }
        return Result.returnFailure();
    }

}
